﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using GoTextPalm.Core.Localization.Reducer;

namespace GoTextPalm.Core.Data
{
    public abstract class Language
    {
        private String langCode;
        public String LangCode { get { return langCode; } protected set { langCode = value; } }

        public CultureInfo CultureInfo { get { return new CultureInfo(langCode); } }

        private String name;
        public String Name { get { return name; } protected set { name = value; } }

        private IRedCmd reducer;
        public IRedCmd Reducer { get { return reducer; } protected set { reducer = value; } }

        private IConvCmd converter;
        public IConvCmd Converter { get { return converter; } protected set { converter = value; } }

        public override String ToString()
        {
            return Name;
        }
    }

    public class Italian : Language
    {
        internal Italian()
        {
            LangCode = "it-IT";
            Name = "Italian";
            GoTextPalm.Core.Localization.Reducer.Italian i = new GoTextPalm.Core.Localization.Reducer.Italian();
            Reducer = i;
            Converter = i;
        }
    }

    public class English : Language
    {
        internal English()
        {
            LangCode = "en";
            Name = "English";
            GoTextPalm.Core.Localization.Reducer.English i = new GoTextPalm.Core.Localization.Reducer.English();
            Reducer = i;
            Converter = i;
        }
    }
}
